home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
301-325
/
disk_324
/
dpfft
/
readme2
< prev
next >
Wrap
Text File
|
1992-05-06
|
5KB
|
138 lines
This code is an extension of the program on FISH-disk 290 and is
considered as freeware in the usual sense.
For its general usage see the file readme1.
The following has been added:
- A Fast Fourier Transform (FFT)
- Display of a (customized) amplitude and phase-spectrum
- A socalled prewhitening capability of the data
- A Welch window for spectral smoothing
A Leftklick on FFT in the plotwindow (if you cannot find he requester
double-klick with right) brings up the FFT requester. Not yet implemented
are:
- A 3-D plot of (running) spectra
- A real transform by means of the autocorrelation-function
- Log-log plots and normalized spectra
- The complex plane
If you find gadgets with no function at all, this will be the reason.
The general idea of the program is to read in arbitrary experimental
data, visualize them and crry out a Fouriertransform of an interesting
detail. The start of the transform is determined by the first datum in
the plotwindow.
The defaultvalue of 7 in the FFT requester means that 2^7 points will be
used for the transform. The reason behind the power of two is simply
velocity. Clicking on OK ,using default, yields 2^(7-1)=128 harmonics.
With redundancy you can skip a variable number of points for the
transform in case of a long record. Typing in 1 means that every third
point is taken into account for the transformation.
The appearing window shows in the upper half the amplitudes and
below you see the appropriate phases.
A double-klick with the right mousebutton brings up the requester.
The arrows manipulate the Amplitudes of the Harmonics. OK brings you
back into the main window and with NOK into the plotwindow. With PRT
a little requester is fired up where RDC means a reduction of the
printed picture (can be useful for 9 needles). The crosshair for the
amplitudes (leftklick) can only be activated without the requester.
IDCMP input of Intuition is blocked in case of a request. To that
purpose the CRH gadget is activated which lets the requester
dissappear. The other gadget has not been implemented yet
---------------------------------------------------------------
EXAMPLE
-------
To see the full power of a fouriertransform as far as periodic signals
is concerned (the interpretation is more involved for random signals),
the following step by step procedure may be useful (for the usage of the
program as well):
1.
If you are on the workbench, double-klick with left on the dpfft icon.
(If you are in CLI, type <dpfft> and return). It is possibly simplest to
boot with the FISH-disk itself so you can use the default values of dpfft.
2.
Activate with the right mousebutton the ASCII-file option in the menu
3.
Search for and Klick on signals(dir) and after that on "eeg"
4.
Read in, say, 1500 data (leftklick on the 'Number of data:' stringadget
and type in 1500)
6.
Left-klick with the mousebutton on OK and choose the 'plot' option in
the menu
7.
Double-klick the right mousebutton to fire up the requester for the options
Center the data with the second gadget from the left. Observing the signal
(expand it horizontally, for instance, by means of a leftklick on OK and
using the small triangles in the titlebar) shows that it is not possible
to detect hidden periodicities in the signal
8.
Let the requester reappear by means of a double-klick with the right
mousebutton and activate FFT
9.
Since we read in 1500 data, the maximum N can be used which is 10.
(The program works with max 2^10=1024 points since the windowresolution
amounts to 640 sothat 512 harmonics can be displayed maximally, if we want
to retain a pixel to pixel resolution). Klick on the stringadget and
type in 10.
10.
With no window or prewhitening (=first difference filter), which are
the WND and FLT gadgets, a direct transform is carried out by activating
OK. This takes a few seconds. A transform with N<10 will be faster.
11.
Double-klick with the right mousebutton for the requester. Use the
arrow which is pointing downwards for reducing the amplitudes of the
harmonics. Do this until all the harmonics are displayed. A pronounced
peak should appear at right.
12.
Let the requester dissappear by means of CRH and klick once on the
left mousebutton in the harmonics area. A crosshair appears. Go to
this peak and note the number of the harmonic (which should be 206).
DISCUSSION
----------
The pronounced peaks are the hidden periodicities in the signal.
Remember that the recordlength of 1024 points with a 4 ms sampling period
totals to ca 4 seconds. The question is as to whether the peak at right
belongs to the signalsource itself or not. Placing the crosshair on that
particular harmonic shows that it carries the number 206. It is now clear
where it comes from, since 204/(4 seconds) represents the frequency of
the linevoltage (50 Hz in Europe). The other peaks can be identified
with the socalled alpha and beta waves of an electroencephalogram.
------------------------------------------------------------------